#include "menu.h"
#include "header.h"
 
using namespace std;
void SubMenuOne();
void SubMenuTwo();
void SubMenuThree();
void SubMenuFour();
void StandardSubMenu(string);
 
int main() {
    // Disable Console Cursor
    VP_SetConsoleCursor(false);

    Menu MenuMain;
    MenuMain.SetSelectors("->");
    //Main Menu Options
	MenuMain.SetTitle("MAIN MENU");
    MenuMain.AddOption(" Master List");
	MenuMain.AddOption(" Scheduling");
	MenuMain.AddOption(" Billing");
	MenuMain.AddOption(" Reporting");
	MenuMain.AddOption(" Exit");

    do {
        switch(MenuMain.Play(MenuMain.Size())) {
            case 1:
                SubMenuOne();
				break;
            case 2:
                SubMenuTwo();
				break;
            case 3:
                SubMenuThree();
				break;
			case 4:
                SubMenuFour();
				break;
			case 5:
                break;
        }
    } while (MenuMain.LastSelection() != 5);
 
    return 0;
}

void SubMenuOne()
{
	VP_SetConsoleCursor(false);
	Menu SubMenu;
	
	SubMenu.SetSelectors("->");
	SubMenu.SetTitle("MASTER LIST");
	SubMenu.AddOption(" Practitioners");
	SubMenu.AddOption(" Patients");
	SubMenu.AddOption(" ICD Codes");
	SubMenu.AddOption(" CPT Codes");
	SubMenu.AddOption(" Referrals");
	SubMenu.AddOption(" Return to Main Menu");

	 do {
        switch(SubMenu.Play(SubMenu.Size())) {
            case 1:
				StandardSubMenu("For Practitioners");
				break;
            case 2:
				StandardSubMenu("For Patients");
                break;
            case 3:
				StandardSubMenu("For ICD Codes");
                break;
			case 4:
				StandardSubMenu("For CPT Codes");
                break;
			case 5:
				StandardSubMenu("For Referrals");
                break;
			case 6:
				break;
        }
    } while (SubMenu.LastSelection() != 6);

}
void SubMenuTwo()
{
	VP_ClearScreen();
	StandardSubMenu("Scheduling");
}
void SubMenuThree()
{
	VP_SetConsoleCursor(false);
	Menu SubMenu;
	
	SubMenu.SetSelectors("->");
	SubMenu.SetTitle("BILLING MENU");
	SubMenu.AddOption(" Visits by Date - Descending");
	SubMenu.AddOption(" Payments by Date - Descending");
	SubMenu.AddOption(" Return to Main Menu");

	 do {
        switch(SubMenu.Play(SubMenu.Size())) {
            case 1:
				StandardSubMenu("Visits be Date - Descending");
				break;
            case 2:
				StandardSubMenu("Payments by Date - Descending");
                break;
            case 3:
				break;
        }
    } while (SubMenu.LastSelection() != 3);

}
void SubMenuFour()
{
	VP_SetConsoleCursor(false);
	Menu SubMenu;
	
	SubMenu.SetSelectors("->");
	SubMenu.SetTitle("REPORT MENU");
	SubMenu.AddOption(" Medical History");
	SubMenu.AddOption(" Collection Letters");
	SubMenu.AddOption(" Aged Receivables");
	SubMenu.AddOption(" Return to Main Menu");

	 do {
        switch(SubMenu.Play(SubMenu.Size())) {
            case 1:
				StandardSubMenu("Medical History");
				break;
            case 2:
				StandardSubMenu("Collection Letters");
                break;
            case 3:
				StandardSubMenu("Aged Receivables");
                break;
			case 4:
				break;
        }
    } while (SubMenu.LastSelection() != 4);

}
void StandardSubMenu(string x)
{
	VP_ClearScreen();
	cout<<x;
	getchar();
	
} 